package com.example.birdfriends.service.impl;

import com.example.birdfriends.dao.export.DataExportExcelDao;
import com.example.birdfriends.dao.export.DataExportDao;
import com.example.birdfriends.pojo.export.vo.DataExportVo;
import com.example.birdfriends.service.DataExportReadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DataExportReadServiceImpl implements DataExportReadService {
    @Autowired
    private DataExportDao dataExportReadDao = null;
    @Autowired
    private DataExportExcelDao dataExportExcelDao = null;

    @Override
    public List<DataExportVo> queryDataExportListByExportStat(String exportStat) {
        return dataExportReadDao.queryDataExportListByExportStat(exportStat);
    }

    @Override
    public DataExportVo queryDataExportDataById(String exportId) {
        return dataExportReadDao.queryDataExportDataById(exportId);
    }

    @Override
    public List<Map<String, Object>> queryTableInfoByTableName(String exportTable) {
//        System.out.println("导出表名称："+exportTable);
        return dataExportReadDao.queryTableInfoByTableName(exportTable);
    }

    @Override
    public List<DataExportVo> queryDataExportExcelListById(String exportId) {
        return dataExportExcelDao.queryDataExportExcelListById(exportId);
    }
}
